package com.dnjn.happiness.emo.api;

import com.dnjn.happiness.common.core.constant.SecurityConstants;
import com.dnjn.happiness.common.core.constant.ServiceNameConstants;
import com.dnjn.happiness.common.core.domain.R;
import com.dnjn.happiness.emo.api.factory.RemoteHlbeanTypeFallbackFactory;
import com.dnjn.happiness.emo.api.model.HlbeanTypeVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestHeader;

@FeignClient(contextId = "remoteHlbeanTypeService",value = ServiceNameConstants.EMO_SERVICE,fallbackFactory = RemoteHlbeanTypeFallbackFactory.class)
public interface RemoteHlbeanTypeService {

    @GetMapping("/hlbeanType/getHlbeanTypeByCode/{code}")
    public R<HlbeanTypeVO> getHlbeanTypeByCode(@PathVariable("code") String code, @RequestHeader(SecurityConstants.FROM_SOURCE) String source);
}
